﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace WinnerCMS.Data.Mapping
{
    public partial class ModelMap
        : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<WinnerCMS.Model.Model>
    {
        public ModelMap()
        {
            // table
            //ToTable("CMS_Model");

            // keys
            HasKey(t => t.Id);

            // Properties
            Property(t => t.Id)
                
                .IsRequired();
            Property(t => t.ModelName)
                
                .HasMaxLength(50)
                .IsOptional();
            Property(t => t.DataTable)
                .IsUnicode(false)
                .HasMaxLength(50)
                .IsOptional();
            Property(t => t.BaseModel)
                
                .HasMaxLength(50)
                .IsOptional();
            Property(t => t.ContentName)
                
                .HasMaxLength(50)
                .IsOptional();
            Property(t => t.ContentUnit)
                
                .HasMaxLength(50)
                .IsOptional();
            Property(t => t.Filter)
                
                .HasMaxLength(4000)
                .IsOptional();
            Property(t => t.Remark)
                
                .HasMaxLength(255)
                .IsOptional();
            Property(t => t.HtmlSavePath)
                
                .HasMaxLength(255)
                .IsOptional();
            Property(t => t.MaxCategoryPageNo)
                
                .IsRequired();
            Property(t => t.AdminUploadPath)
                
                .HasMaxLength(255)
                .IsOptional();
            Property(t => t.AdminUploadSize)
                
                .IsOptional();
            Property(t => t.AdminFileTypes)
                
                .HasMaxLength(1000)
                .IsOptional();
            Property(t => t.EnableMemberUpload)
                
                .IsOptional();
            Property(t => t.MemberUploadPath)
                
                .HasMaxLength(255)
                .IsOptional();
            Property(t => t.MemberUploadSize)
                
                .IsOptional();
            Property(t => t.MemberFileTypes)
                
                .HasMaxLength(1000)
                .IsOptional();
            Property(t => t.AdminPass)
                
                .IsRequired();
            Property(t => t.CommentAutoPass)
                
                .IsRequired();
            Property(t => t.Contribution)
                
                .IsRequired();
            Property(t => t.SearchOption)
                
                .IsRequired();
            Property(t => t.IsShowNewSign)
                
                .IsRequired();
            Property(t => t.NewSignKeep)
                
                .IsRequired();
            Property(t => t.PageSize)
                
                .IsRequired();
            Property(t => t.Hide)
                
                .IsOptional();

            // Relationships
            

            //InitializeMapping();
        }
    }
}

